package com.dys.testequals2;


/**
 * @className: com.dys.testequals2.PhoneTest
 * @description: com.dys.testequals2
 * @author: pine cone
 * @version: v1.0.0
 * @createTime: 2024/07/20 下午7:35
 */
public class PhoneTest {
    /**
     * 这是一个main()方法,是应用程序的入口
     *
     * @param args 方法的形参列表,是一个字符串数组,包含了从命令行传递给程序的参数
     */
    public static void main(String[] args) {
        Phone p1 = new Phone("华为Mate60 pro", 8999.9, 2023);
        Phone p2 = new Phone("华为Mate60 pro", 8999.9, 2023);
        Cat cat = new Cat();
        System.out.println(p1.equals(p2));
        System.out.println("========p1==p1==========");
        System.out.println(p1.equals(p1));
        System.out.println(p1.equals(null));
        System.out.println(p1.equals(cat));

        long num1 = Double.doubleToLongBits(5.5);
        System.out.println(num1);
        long num2 = Double.doubleToLongBits(5.5);
        System.out.println(num2);

        String str1 = "hello";
        String str2 = "hello";
        System.out.println(str1 == str2);
    }
}
